package pdd;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @author zhangmin
 * @create 2022-03-20 15:54
 */
public class PDD2021_2 {
    public static void main(String[] args){
        Scanner cin=new Scanner(System.in);
        int n=cin.nextInt();
        if(n==0){
            System.out.println(0);
            return;
        }
        cin.nextLine();
        char[] x=cin.nextLine().toCharArray();
        char[] y=cin.nextLine().toCharArray();
        Arrays.sort(x);
        Arrays.sort(y);
        int res=0;
        for (int i = 0; i < n; i++) {
            res+=Math.abs(x[i]-y[i]);
        }
        System.out.println(res);
    }
}
